package com.demo.base.http;

import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;

import java.net.URI;

/**
 * @author 曳戈泰尔
 * @version 1.0
 * @description 定义一个带body的GET请求 继承 HttpEntityEnclosingRequestBase
 * @date 2023/3/29 4:04 PM
 */
public class HttpGetWithEntity extends HttpEntityEnclosingRequestBase {

    private static final String METHOD_NAME = "GET";

    @Override
    public String getMethod() {
        return METHOD_NAME;
    }

    public HttpGetWithEntity() {
        super();
    }

    public HttpGetWithEntity(final URI uri) {
        super();
        setURI(uri);
    }

    HttpGetWithEntity(final String uri) {
        super();
        setURI(URI.create(uri));
    }
}
